<?php
include_once("../inc/Function.php");
if($_SESSION['a']['alevel']!=5 && $power['hylb']!=1){
	echo "<script>alert('权限不足');window.location.href='index.php';</script>";exit;
}
$psize = 15;
$page = isset($_GET['page'])?$_GET['page']:1;
$uname = isset($_GET['uname'])?$_GET['uname']:"";
$level = isset($_GET['level'])?$_GET['level']:-1;
$tlevel = isset($_GET['tlevel'])?$_GET['tlevel']:0;
$userlist = userlist($page,$psize,$uname,$level,$tlevel);
$num = userlistnum($uname,$level,$tlevel);
if($userlist){
    $msg = 1;
}else{
    $msg = 0;
}
$page1 = page1($num,$psize,$page,$_SERVER['PHP_SELF']."?uname=$uname&level=$level&tlevel=$tlevel");
$num0 = usernum(0);
$num1 = usernum(1);
$num2 = usernum(2);
$num3 = usernum(3);
$tpl->assign('num1',$num0);
$tpl->assign('num2',$num1);
$tpl->assign('num3',$num2);
$tpl->assign('num4',$num3);
$tpl->assign('level',$level);
$tpl->assign('tlevel',$tlevel);
$tpl->assign('uname',$uname);
$tpl->assign('uarr1',$uarr1);
$tpl->assign('tdarr',$tdarr);
$tpl->assign('tdarr1',$tdarr1);
$tpl->assign('msg',$msg);
$tpl->assign('list',$userlist);
$tpl->assign('page',$page);
$tpl->assign('page1',$page1);
$tpl->show('userlist');
?>